Window  

Inherits from: 
System 

_____________________________________________________
           name *238*

Type:   string 

Description:   Appears as the title in the banner of the «Window» when it is active, and is used by the primitives find-window and find-window-a for finding a «Window» by name.

_____________________________________________________
           owner  *238*

Type:   Application 

Constraints:
Not settable.  

Description: If «Window» and some «Application» are both active, then the value of owner is the active «Application». Otherwise NULL.

_____________________________________________________
           active?  *238*

Type:   boolean

Constraints:
Not settable on default or if there is no active «Application».

Description:  
TRUE if and only if there is an active «Application» and «Window» is one of its active windows.

Side effects:
When this attribute is set to TRUE, «Window» is opened and added to the left end of the window list in attribute windows of the active «Application». When set to FALSE, «Window» is closed and removed from this list.

Neither are prescribed for opening or closing windows.  For more information see the activate method and close method System instance attributes.

_____________________________________________________
   
    window record *239*

Type:   WindowRecord@

Constraints:
Not settable.

Description:
The window record for the «Window».

_____________________________________________________

def ID  *239*

Type:   integer 

Constraints:
Not settable when «Window» is active.

Description: The number of the Macintosh procedure used to draw the window structure. See Mac Constants in the ˙Info… dialog for values.

_____________________________________________________

modal?  *239*

Type:   boolean

Description: If TRUE, the system beeps whenever the user attempts to click outside the «Window».  

_____________________________________________________

close?  *239*

Type:   boolean 

Constraints:
Not settable when «Window» is active. Must be FALSE if the value of defID indicates that «Window» is not a document window.

Description: The «Window» has a close box only if the value of this attribute is TRUE.

_____________________________________________________

selected item *240*

Type:   null | Edit Text | Scroll Text | Scroll List 

Constraints:
Not settable to an «Edit Text», «Scroll Text» , or «Scroll List» that is not active or visible, or that does not have «Window» as owner.

Description: «Edit Text», «Scroll Text», or «Scroll List» currently being edited in «Window», or NULL if there is no active text editor in «Window». When «Window» is activated, the value of selected item is the leftmost «Edit Text» in the list of «Window Items» in the attribute item list.

Side effects:   Setting causes the previously selected «Edit Text» or «Scroll Text» to be deselected. Setting to NULL causes all text items to be deselected.

_____________________________________________________

location  *240*

Type:   Point

Description:
The location of the upper left corner of «Window» .

Side effects:
Setting causes «Window» to be redrawn.

_____________________________________________________

size  *240*

Type:   Point

Description:
Offset of the lower right corner of «Window» from the upper left corner.

Side effects:
Setting causes «Window» to be redrawn.

_____________________________________________________

activate method  *241*

Type:   string 

Description: The name of the method called when «Window» is activated (brought to the front) or deactivated.

The prescribed method for opening a window is to call /Open.  The supplied /Open method also calls /Open of window items in case window items require such a message. 

Method inputs: «Window», <boolean: new value of active?>, <activate EventRecord> 

_____________________________________________________

close method   *241*

Type:   string 

Description: The name of the method called when the close box in «Window» is clicked.  Calling /Close is the prescribed method.

Method inputs:
«Window», <EventRecord of click> 

_____________________________________________________

idle method   *241*

Type:   string 

Description: The name of the method called when «Window» is the top window, the Application Manager is running, and there are no events pending (that is, the last event is a null event).

Method inputs:
«Window», <Point: position of cursor>, <EventRecord of null event>

_____________________________________________________

key method   *242*

Type:   string 

Description: The name of the method called when «Window» is the top window and has no selected «Edit Text» or «Scroll Text», the Application Manager is running, and a key (other than a modifier) is depressed.

Method inputs:
«Window», <integer: ASCII code for key>, <EventRecord of keypress> 

_____________________________________________________

item list *242*

Type:   list of Window Item 

Constraints:
Not settable when «Window» is active.

Description: The list of «Window Item»s found in the «Window».  The primitive find-item searches item list to find a «Window Item» by name or by index.

Warning:
Results are unpredictable if any «Window Item» is repeated in item list, or occurs in the item list of more than one active «Window».